<?xml version="1.0" encoding="UTF-8" ?>
<service>
	<name>main</name>
	<request_path>/main</request_path>
	<preserve_host>true</preserve_host>
	<strip_request_path>true</strip_request_path>
	<upstream_url>http://{{.Env.MAIN_SERVICEADDRESS}}:{{.Env.MAIN_PORT}}/main
	</upstream_url>
	<plugin name="health-check" enabled="true">
		<health_url>/health</health_url>
		<status>200</status>
		<timeout>1000</timeout>
		<retries>20</retries>
		<sleep>1</sleep>
		<expire>10</expire>
	</plugin>
	<plugin name="authentication" enabled="true">
        <app_key>{{.Env.API_KEY}}</app_key>
        <app_secret>{{.Env.API_SECRET}}</app_secret>
        <silent_mode>true</silent_mode>
    </plugin>
    <plugin name="authorize" enabled="true">
        <authorize_server_url>http://{{.Env.MAIN_SERVICEADDRESS}}:{{.Env.MAIN_PORT}}</authorize_server_url>
    </plugin>
</service>